package team.sun.sss;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import team.sun.sss.dao.student.StudentDao;
import team.sun.sss.pojo.student.Student1;

import java.sql.SQLException;
import java.util.List;

@SpringBootTest
public class StudentTest2 {
    @Autowired
    StudentDao studentDao;
    @Test
    void contextLoads() throws SQLException {
        //显示所有学生信息
       /*List<Student1> studentList= studentDao.studentList();
        for(Student1 student:studentList){
            System.out.println(student);
        }*/
        //显示某个学生信息
        /*Student1 student1 = studentDao.selectStuById(1174251001);

        System.out.println(student1);*/
        //学生修改自己的信息
     /* int student=studentDao.studentUpdate(1174251001,"内蒙古","","",""
      ,"","","","","","");
*/

        //辅导员查找所带学生
       /* List<Student1> studentList= studentDao.studentInstructorList("雷平");
        for(Student1 student:studentList){
            System.out.println(student);
        }*/
    //学工修改学生信息
 /*int staffUpdateStu=studentDao.staffUpdateStu("",125258,"张三","wu","未婚",
         "女","1998-02-01","女","女","女","女","女","女",
         "女","女","女","女","女","女","女","女",
         "女","女","女","女","女","女","女","2019-09-01","女",
         "女","女","女","女",1211011001);
*/
 //学工插入学生信息

      /*  int insertStudent = studentDao.insertStudent(new Student1("",12345,"wu","wu","w",
                "1998-02-01","12","女","女","女","女","女","女",
                "女","女","女","女","女","女","女","女",
                "女","女","女","女","女","女","女","2019-09-01","女",
                "女","女","女","女","1"));


        */

        /*List<Student1> studentList= studentDao.selectStuById(12345);
        for(Student1 student:studentList){
            System.out.println(student);
        }*/
       // studentDao.updateStudentAttention(12345,"");
        List<Student1> studentList= studentDao.stuIdList(12345);
        for(Student1 student:studentList){
            System.out.println(student);
        }
      //  Student1 student11=studentDao.stuIdList(12345);


          //  System.out.println(student11);

    }
}
